refactor(samples): Convert main screen to Jetpack Compose#5017
Merged
refactor(samples): Convert main screen to Jetpack Compose#5017
Conversation
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
romtsn
approved these changes
Jan 19, 2026
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛
Internal Changes 🔧Deps
Other
🤖 This preview updates automatically when you update the PR. |
sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MainActivity.kt
Outdated
Show resolved
Hide resolved
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| fc5ccaf | 276.52 ms | 370.46 ms | 93.93 ms |
| e59e22a | 374.68 ms | 442.14 ms | 67.46 ms |
| fcec2f2 | 357.47 ms | 447.32 ms | 89.85 ms |
| dba088c | 328.51 ms | 423.79 ms | 95.28 ms |
| fc5ccaf | 279.11 ms | 353.34 ms | 74.23 ms |
| b03edbb | 352.20 ms | 423.69 ms | 71.49 ms |
| ee747ae | 396.82 ms | 441.67 ms | 44.86 ms |
| 2387c2c | 317.04 ms | 354.60 ms | 37.56 ms |
| fcec2f2 | 314.96 ms | 373.66 ms | 58.70 ms |
| d15471f | 302.62 ms | 353.84 ms | 51.22 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| fc5ccaf | 1.58 MiB | 2.13 MiB | 557.54 KiB |
| e59e22a | 1.58 MiB | 2.20 MiB | 635.34 KiB |
| fcec2f2 | 1.58 MiB | 2.12 MiB | 551.50 KiB |
| dba088c | 1.58 MiB | 2.13 MiB | 558.99 KiB |
| fc5ccaf | 1.58 MiB | 2.13 MiB | 557.54 KiB |
| b03edbb | 1.58 MiB | 2.13 MiB | 557.32 KiB |
| ee747ae | 1.58 MiB | 2.10 MiB | 530.95 KiB |
| 2387c2c | 1.58 MiB | 2.13 MiB | 559.54 KiB |
| fcec2f2 | 1.58 MiB | 2.12 MiB | 551.50 KiB |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
Previous results on branch: markushi/feat/restructure-sample-app
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 0f80cc7 | 318.59 ms | 363.17 ms | 44.58 ms |
| 39e6627 | 317.46 ms | 354.65 ms | 37.19 ms |
| d499045 | 350.63 ms | 394.56 ms | 43.93 ms |
| ec4fa43 | 313.16 ms | 352.71 ms | 39.55 ms |
| 09cc4fd | 359.84 ms | 440.80 ms | 80.96 ms |
| 3363fdc | 306.98 ms | 350.80 ms | 43.82 ms |
| 447c02e | 357.40 ms | 415.18 ms | 57.78 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 0f80cc7 | 1.58 MiB | 2.19 MiB | 620.05 KiB |
| 39e6627 | 1.58 MiB | 2.19 MiB | 620.05 KiB |
| d499045 | 1.58 MiB | 2.19 MiB | 620.05 KiB |
| ec4fa43 | 1.58 MiB | 2.19 MiB | 619.99 KiB |
| 09cc4fd | 1.58 MiB | 2.19 MiB | 620.06 KiB |
| 3363fdc | 1.58 MiB | 2.19 MiB | 620.05 KiB |
| 447c02e | 1.58 MiB | 2.19 MiB | 620.05 KiB |
sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MainActivity.kt
Show resolved
Hide resolved
sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MainActivity.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
sentry-compose/src/androidMain/kotlin/io/sentry/compose/gestures/ComposeGestureTargetLocator.kt
Show resolved
Hide resolved
…sentry/sentry-java into markushi/feat/restructure-sample-app
romtsn
approved these changes
Jan 28, 2026
Member
romtsn
left a comment
There was a problem hiding this comment.
LGTM, nice find with compose scrolling!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Converts the MainActivity from Java to Kotlin, categorizing all our buttons a bit nicer too.
Also fixes a missing scroll detection bug for Jetpack Compose.
requires #5016 to be merged first.
💡 Motivation and Context
Modernizes the sample app to use Kotlin, which is now the recommended language for Android development. This makes the sample more representative of current best practices and simplifies future enhancements.
💚 How did you test it?
Manual testing of the sample app to ensure functionality remains unchanged.
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps